#region Imported Namespaces


#endregion


#region Imported Namespaces


using System;
using System.Diagnostics;
using System.Drawing;

using WtfManager.WindowsNative.Shell32;


#endregion


namespace WtfManager.FileManager
{
  ///<summary>
  /// describes and manipulates a file system file.
  ///</summary>
  public class FileSystemFile: FileSystemItem
  {
    #region Constructors/Finalizers


    ///<summary>
    /// Default FileSystemFile constructor.
    ///</summary>
    public FileSystemFile(string fileName)
    {
      Name = fileName;
    }


    #endregion


    #region Properties/Indexers


    public override bool IsFile
    {
      get
      {
        return true;
      }
    }

    public override bool IsHidden
    {
      get
      {
        return false;
      }
    }

    public override bool IsMovable
    {
      get
      {
        return true;
      }
    }


    #endregion


    #region Methods


    protected override void OnRefresh()
    {
    }


    ///<summary>
    /// Gets an icon of a file system item.
    ///</summary>
    ///<returns>Returns <see cref="Icon"/>.</returns>
    protected override Icon GetIcon(FileInfo flags)
    {
      var pidl = GetPidl(flags);
      //var overlayIndex = pidl.GetIconOverlayIndex();

      return pidl.Icon;
    }



    /// <summary>
    /// Opens this file.
    /// </summary>
    public void Open()
    {
      Process.Start(FileSystemPath);
    }


    #endregion
  }
}